package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    void deleteByPrimaryKey(Long id);

    void deleteRelation(Long id);

    void insert(Employee entity);

    void insertRelation(@Param("emplId") Long emplId, @Param("roleId") Long roleId);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    void updateByPrimaryKey(Employee entity);
    

    List<Employee> queryForList(EmployeeQueryObject qo);


    List<String> selectPermissionExpressionByEmplId(Long id);

    void batchDelete(Long[] ids);

    Employee selectEmplByUsername(String principal);

    List<String> selectEmploRoleSnsByEmploId(Long id);

    String selectByName(String name);
}